window.onload=function () {
    let button=document.querySelector(".Allselect");
    let mesList=document.querySelectorAll(".continerBox");
    let selectArr=document.querySelectorAll(".selc");
    let select=document.querySelectorAll(".selc .iconfont")

    var flag=false;
    button.onclick=function () {
        flag=!flag;
        if(flag==true){
            for (let i = 0; i < select.length; i++) {
                var element = select[i];
                element.classList.add("icongouxuanzhong");
            }
            button.innerHTML="取消";
        }else{
            for (let j= 0; j < select.length; j++) {
                var element = select[j];
                element.classList.remove("icongouxuanzhong");
            }
            button.innerHTML="全选";
        }
        
    }
    var cont=document.querySelectorAll(".cont1");
    var navItem1=document.querySelectorAll(".navItem");
    navItem1.forEach(function (ele, index) {
        ele.onclick = function () {
            cont.forEach(function (value, i) {
                value.style.opacity = "0";
                navItem1[i].classList.remove("navItem1");
            });
            navItem1[index].classList.add("navItem1");
            cont[index].style.opacity = "1";
        };

    })




    /* navItem1.forEach(function(ele,index){
        console.log(ele,index);
        cont.forEach(function (element,i) {
            element.classList.remove("navItem1");
            cont[i].style.display="none";
        })
        ele.onclick=function () {
            cont[index].style.display="block";
            ele.classList.add("navItem1");
        }
    }) */








}